package core
{

	public class EventArgExtend
	{
		public function EventArgExtend()
		{
		}

		public static function create(f:Function, ... arg):Function
		{
			var F:Boolean=false;
			var _f:Function=function(e:*, ... _arg)
			{
				_arg=arg
				if (!F)
				{
					F=true
					_arg.unshift(e)
				}
				f.apply(null, _arg)
			};
			return _f;
		}

		public static function toString():String
		{
			return "Class JEventDelegate";
		}
	}
}
//txtShow.addEventListener(MouseEvent.CLICK,EventArgExtend.create(clickHandler,1,"str"));
//
//            private function clickHandler(e:Event,...arg):void
//            {
//                Alert.show(arg[0].toString());
//                Alert.show(arg[1].toString());
//            }